﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace Configurator
{
    static class Program
    {
        /// <summary>
        /// Главная точка входа для приложения.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();

            #region "Начальная тестовая конфигурация"

            var listSubItems1 = new List<SubItem>() {
                new SubItem("15", new List<Pair>()),
                new SubItem("17", new List<Pair>()),
                new SubItem("16", new List<Pair>())
            };

            var listSubItems2 = new List<SubItem>() {
                new SubItem("14", new List<Pair>()),
                new SubItem("13", new List<Pair>())
            };

            var selectedItem = new Item("15/16/17 СП2", listSubItems1);

            var ListConfiguration = new List<Item>() {
                selectedItem,
                new Item("13/14 СП1", listSubItems2)
            };

            #endregion

            using (var formConf = new FormConfigurator(ListConfiguration, selectedItem))
            {
                if (formConf.ShowDialog() == DialogResult.OK)
                {
                    ListConfiguration = formConf.ResultConfiguration;
                }
            }
        }
    }
}
